<?php if (sizeof($this->comments) > 0) { ?>
<ul>
<?php foreach ($this->comments AS $key => $val) { ?>
<li>
	<p class="title">
		<?php if ($this->answer_info['anonymous'] AND $this->answer_info['uid'] == $val['uid']) { ?>
		<a><img src="<?php echo G_STATIC_URL; ?>/common/avatar-min-img.png" alt="" width="20" class="img" /></a>
		<a><?php _e('匿名用户'); ?></a>
		<?php } else { ?>
		<a href="people/<?php echo $val['url_token']; ?>" data-id="<?php echo $val['uid']; ?>"><img src="<?php echo get_avatar_url($val['uid'], 'min'); ?>" alt="" width="20" class="img" /></a>
		<a href="people/<?php echo $val['url_token']; ?>" data-id="<?php echo $val['uid']; ?>"><?php echo $val['user_name']; ?></a>
		<?php } ?>
		
		<span class="pull-right color-999">
			<?php echo date_friendly($val['time']); ?> &nbsp;
			<?php if ($this->user_id) { ?>
				<?php if (($val['uid'] == $this->user_id AND !$this->question['lock']) OR $this->user_info['permission']['is_administortar'] OR $this->user_info['permission']['is_moderator']) { ?>
				<a href="javascript:;" onclick="AWS.User.remove_comment($(this).parent(), '<?php echo $val['question_id'] > 0 ? 'question' : 'answer'; ?>', <?php echo $val['id']; ?>);"><?php _e('删除'); ?></a> •
				<?php } ?>
				<?php if ($this->answer_info['anonymous'] AND $this->answer_info['uid'] == $val['uid']) { ?><a href="javascript:;" onclick="$(this).parents('.aw-comment-box').find('form textarea').insertAtCaret('@<?php echo $val['user_name']; ?>:');$(this).parents('.aw-comment-box').find('form').show().find('textarea').focus();$.scrollTo($(this).parents('.aw-comment-box').find('form'), 300, {queue:true});"><?php _e('回复'); ?></a><?php } ?>
			<?php } ?>
		</span>
	</p>
	<p>
		<?php echo nl2br($val['message']); ?>
	</p>
</li>
<?php } ?>
</ul>
<?php } ?>
